import Layout from '../views/layout/Layout'

const _import = require('./_import_' + process.env.NODE_ENV);

export default {
  path: '/finance',
  component: Layout,
  name: 'finance',
  meta: {
    title: '财务管理',
    icon: 'icon',
    roles: [1, 4]
  },
  children: [{
      path: 'SalesFinance',
      component: _import('reconciliation/SalesFinance'),
      name: 'SalesFinance',
      meta: {
        title: '财务销售对账',
        buttons: {
          add: { label: '新建', enabled: true },
          view: { label: '查看', enabled: true },
          download: { label: '下载', enabled: true }
        }
      },
    },
    {
      path: 'list',
      component: _import('finance/list/index'),
      name: 'bill',
      meta: {
        title: '账单列表',
        buttons: {
          generate: {
            label: '生成对账单',
            enabled: true
          },
          detail: {
            label: '查看',
            enabled: true
          },
          exportUnPostDetail: {
            label: '导出商家未发送明细',
            enabled: true
          },
          importUnPostDetail: {
            label: '导入商家未发送明细',
            enabled: true
          },
          exportBill: {
            label: '导出账单',
            enabled: true
          },
          publicBill: {
            label: '发布账单',
            enabled: true
          },
          cancelPublic: {
            label: '取消发布',
            enabled: true
          },
          modifyMoney: {
            label: '修改金额',
            enabled: true
          },
          export: {
            label: '导出',
            enabled: true
          }
        }
      },
    },
    {
      path: 'detail/:id',
      component: _import('finance/detail/index'),
      name: 'billDetail',
      meta: {
        title: '账单详情',
        icon: 'icon',
        index: '/finance/list'
      },
      hidden: true,
      props: true
    }
  ]
}
